package com.example.springboot11.Controller;


import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * RESTful
 *
 */
@RestController
@RequestMapping(value = "/api")
public class ApiController {


    @GetMapping(value = "/getParameter/{id}")
    public Object getOneParame(@PathVariable Integer id){
        return "id : " + id;
    }

    @PostMapping(value = "/postParameter01")
    public Object postOneParame01(@RequestBody Object id){
        return "id : " + id;
    }

    @PostMapping(value = "/postParameter02")
    public Object postOneParame02(@RequestBody String id){
        return "id : " + id;
    }

    @PostMapping(value = "/postParameter03")
    public Object postOneParame03(@RequestBody String id){
        Map<String,Object> map = new HashMap<String ,Object>();
        map.put("id", id);
        return map;
    }

}
